package com.atgm.mall.gmmailmember.service;

import com.atgm.mall.gmmailmember.entity.MemberCollectArticleEntity;
import com.atgm.mall.gmmailmember.vo.resp.ArticleCollectRespVo;
import com.baomidou.mybatisplus.extension.service.IService;

public interface MemberCollectArticleService extends IService<MemberCollectArticleEntity> {

    Integer queryCollectCountByMemberId(Long memberId);

    /**
     * 保存用户收藏的文章id
     * @param memberCollectArticleEntity
     */
    void saveMemberCollectArticle(MemberCollectArticleEntity memberCollectArticleEntity);

    /**
     * 获取收藏该文章的用户信息
     * @param articleId
     * @return
     */
    ArticleCollectRespVo queryCollectMemberByArticleId(Long articleId);

    /**
     * 判断该用户是否收藏该文章
     * @param articleId
     * @param memberId
     * @return
     */
    Integer haveCollectArticle(Long articleId, Long memberId);
}
